#include <iostream>
using namespace std;

int main()
{
	int m = 0;
	int n = 0;
	scanf("%d", &m);
	scanf("%d", &n);
	if (m % n == 0)
	{
		printf("YES\n");
	}
	else 
	{
		printf("NO\n");
	}
	return 0;
 } 
